
package com.sasis.service.impl;

import java.util.List;

import com.sasis.service.impl.BaseManager;
import com.sasis.model.Office;
import com.sasis.dao.OfficeDao;
import com.sasis.service.OfficeManager;

import com.sasis.util.PageList;
import com.sasis.util.PageRequest;

public class OfficeManagerImpl extends BaseManager implements OfficeManager {
    private OfficeDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setOfficeDao(OfficeDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.sasis.service.OfficeManager#getOffices(com.sasis.model.Office)
     */
    public List getOffices(final Office office) {
        return dao.getOffices(office);
    }

    /**
     * @see com.sasis.service.OfficeManager#getOffice(String id)
     */
    public Office getOffice(final String id) {
        return dao.getOffice(new Integer(id));
    }

    /**
     * @see com.sasis.service.OfficeManager#saveOffice(Office office)
     */
    public void saveOffice(Office office) {
        dao.saveOffice(office);
    }

    /**
     * @see com.sasis.service.OfficeManager#removeOffice(String id)
     */
    public void removeOffice(final String id) {
        dao.removeOffice(new Integer(id));
    }
    public PageList queryForPageList(String listStatementId,  
    		Object parameterObject, PageRequest pageRequest){
	return dao.queryForPageList(listStatementId,   parameterObject, pageRequest);
    }
}
